<extend name="Public:common"/>
<block name="css">
    <style>
        .newMess th{text-align:center;}
        th{text-align: center;}
    </style>
</block>
<block name="content">
    <div class="page-header"><h1><i class="fa fa-home"></i> 首页>城市管理>省列表</h1></div>
     <div class="container-fluid">
                 <table class="table table-striped table-bordered table-hover table-condensed text-center">
                     <tbody>
                         <tr>
                             <th style="width:10%;">序号</th>
                             <th>地区</th>
                             <th style="width:20%;">排序号</th>
                             <th style="width:20%;">状态</th>
                             <th style="width:20%;">操作</th>
                         </tr>
                         <volist name="provinceList" id="vo">
                         <tr>
                             <td>{$i}</td>
                             <td>{$vo.areaName}</td>
                             <td>{$vo.areaSort}</td>
                             <td>
                                 <if condition="$vo['isShow'] eq 1">
                                     <a class="btn btn-xs btn-warning" href="javascript:changeIsShow({$vo.areaId},-1)">锁定</a>
                                     <else/>
                                     <a class="btn btn-xs btn-primary" href="javascript:changeIsShow({$vo.areaId},1)">开通</a>
                                 </if>
                             </td>

                             <td>
                                 <if condition="checkAuth('Dealer/City/cityByProvince')">
                                 <a href="{:U('cityByProvince',array('areaId'=>$vo['areaId'],'areaType'=>1))}" class="btn btn-xs btn-primary">详情</a>
                                 </if>
                                 <if condition="checkAuth('Dealer/City/editCity')">
                                     <a href="{:U('editCity',array('areaId'=>$vo['areaId']))}" class="btn btn-xs btn-primary">编辑</a>
                                 </if>
                                 <if condition="checkAuth('Dealer/City/delCity')">
                                 <a href="javascript:delCity({$vo['areaId']})" class="btn btn-xs btn-primary">删除</a>
                                 </if>
                             </td>
                         </tr>
                         </volist>
                     </tbody>
                 </table>
             </div>
         </div>
     </div>
</block>
<block name="js">
    <script>

        function  delCity(areaId) {
            layer.confirm('确定要删除此国家吗？', {
                offset:'200px',
                btn: ['确定','取消'] //按钮
            }, function(){
                location.href="/index.php?m=Dealer&c=City&a=delCity&areaId="+areaId;
            })
        }

    </script>
</block>